package entity

// AccountEntity settings
type AccountEntity struct {
	ID       *string `gorm:"primaryKey;size:50"`
	Name     *string `gorm:"column:name"`
	Host     *string `gorm:"column:host"`
	Port     *int    `gorm:"column:port"`
	From     *string `gorm:"column:from"`
	Username *string `gorm:"column:username"`
	Password *string `gorm:"column:password"`
}

// TableName name
func (s *AccountEntity) TableName() string {
	return "account"
}

// FindByID find
func (s *AccountEntity) FindByID(id string) bool {
	return CheckDbRes(GetDb().Where("id = ?", id).Find(s))
}
